<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="/user/js/jquery-3.5.0.js"></script>
		<link rel="stylesheet" href="/user/css/pintuer.css">
		<link rel="stylesheet" href="/user/css/admin.css">
		<script src="js/bootstrap.min.js"></script>
		<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
		<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
		<script type="text/javascript">
axios.interceptors.response.use(function (response) {
	console.log(response);
	console.log(response.headers);
	console.info("状态码："+response.data.code);
	if (response.data.code===500){
		window.location.href="/error/500.html";
	}
	return response;
}, function (error) {
	return Promise.reject(error);
});
</script>
	</head>
	<body>
		<div class="panel admin-panel" id="app">
			<table class="table table-hover text-center">
				<tr>
					<th>昵称</th>
					<th>电话</th>
					<th>地址</th>
					<th>头像</th>
					<th>qq</th>
				</tr>
				<tbody>
				<tr>
					<td>{{users.nickname}}</td>
					<td>{{users.phoneNumber}}</td>
					<td>{{users.address}}</td>
					<td><img v-bind:src="users.avatar" class="img-circle" width="10%" height="10%"></td>
					<td>{{users.qq}}</td>
					</td>
				</tr>
				</tbody>
			</table>
		</div>
<script>
	function getParameter(param)
	{
		var query = window.location.search;
		var iLen = param.length;
		var iStart = query.indexOf(param);
		if (iStart == -1)
			return "";
		iStart += iLen + 1;
		var iEnd = query.indexOf("&", iStart);
		if (iEnd == -1)
			return query.substring(iStart);
		return query.substring(iStart, iEnd);
	}
</script>
		<script type="text/javascript">
			new Vue({
				el:"#app",
				data:{
					users:[]
				},
				mounted(){	//当页面元素加载完毕时执行
					var id = getParameter("uid");
					axios.get("/user/selectUserById?uid="+id)
							.then(res => {
								console.info(res);
								this.users=res.data.data
							});
				}
			});
		</script>
	</body>
</html>
